namespace tfapi
{
	struct Vector3f
	{
		float x, y, z;
	};

	struct BoundBox3f
	{
		Vector3f min;
		Vector3f max;
	};

	struct Matrix4f
	{
		float m11, m12, m13, m14,
		      m21, m22, m23, m24,
		      m31, m32, m33, m34,
		      m41, m42, m43, m44;

		Matrix4f GetTranspose() const
		{
			return { m11, m21, m31, m41,
				     m12, m22, m32, m42,
				     m13, m23, m33, m43,
					 m14, m24, m34, m44 };
		}
	};

	enum LightType : int
	{
		lt_Point,
		lt_Direction
	};

	struct Light
	{
	public:
		LightType Type;

		Vector3f Diffuse;
		Vector3f Specular;

		Vector3f Position;
		Vector3f Direction;

		int SceneIndex;
	};

	struct ViewParameters
	{
		Matrix4f ViewMatrix;
		Matrix4f ProjectionMatrix;
		//
		Vector3f Position;
		Vector3f Direction;

		struct
		{
			unsigned Width = 0;
			unsigned Height = 0;
		} ScreenSize;
	};

	struct FrameParameters
	{
		const ViewParameters* View;
		const Light* Ligths;
		int LigthsCount;
	};

	enum RenderState : int
	{
		rs_Solid,
		rs_Transparent,
		rs_Foreground
	};

	class IViewRender
	{
	public:
		virtual void OnDirectDraw(RenderState, const FrameParameters&) = 0;
		virtual bool GetBouningBox(BoundBox3f&) = 0;
	};
}
